;; Test to isolate define function issue
(display "Testing define function with and without set!\n")

;; Test 1: Simple function without set!
(define (simple-func x) (+ x 1))
(display "simple-func result: ")
(display (simple-func 5))
(display "\n")

;; Test 2: Define a variable that will be used in set!
(define counter 0)
(display "counter before: ")
(display counter)
(display "\n")

;; Test 3: Try set! directly
(set! counter 1)
(display "counter after set!: ")
(display counter)
(display "\n")

;; Test 4: Define a function that uses set!
(display "Attempting to define increment function...\n")
(define (increment) (set! counter (+ counter 1)) counter)